<?php get_header(); ?>
	<div id="content">
	<?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="titlearea">
        <p class="datebox"><span class="month"><?php the_time('M') ?></span><span class="day"><?php the_time('d') ?></span></p>
        <?php if(function_exists('get_avatar')) echo get_avatar(get_the_author_id(), '45') ;?>
			  <h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
        <p class="postcat">
          Filed under <?php the_category(','); ?> <?php edit_post_link();?>
        </p>
      </div>
      <div class="entry">
				<?php the_content('Read the rest of this entry &raquo;'); ?>
        <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
        <p class="post-tags"><?php the_tags('Tags: ', ', ', '<br/>'); ?></p>
       </div>
			<div class="meta">
        <p class="byline">
          <?php the_author_posts_link();?> wrote this on <?php the_time('M jS Y');?> at <?php the_time('h:i a');?>
        </p>
			</div>
      <?php comments_template(); //gets the comments.php ?>
    </div>
		<?php endwhile; ?>
    </div>

    <?php else : ?>

		<h2 class="center">Not Found</h2>
		<p class="center">Sorry, but you are looking for something that isn't here.</p>
	<?php endif; ?>  
<?php get_sidebar(); ?>

<?php get_footer(); ?>
